<?php
if(isset($_COOKIE['loginck'])) {
	
	echo "Xin chao, ".$_COOKIE['loginck']."||||";
	echo "<a href='logout.php'>Logout</a>";
	echo "<br/>
	
	<ul class='menu'>
	    <li><embed src='flash/flashvortex.swf' width='50' height='50'/></li>
	    <li><a href='home.php?album=thanhvien&tit=Album'>Album</a>
             <ul>
                  <li><a href='upload.php'>Tao album anh</a></li>
                  <li><a href='#'>Tai ve anh da chon</a></li>
            </ul>
        </li> 
		<li><a href='contact2.php'>Liên hệ hỗ trợ</a></li> 
		   
	</ul>
	
	";
	
	
}

else {

echo "<div id='register'>";
include "register.php";
echo "</div> ";
echo "<div id='login'>";
include "login.php";
echo "</div>";
echo "<br/>
	
	<ul class='menu'>
	    <li><embed src='flash/flashvortex.swf' width='50' height='50'/></li>
	    <li><a href='home.php?album=khach&tit=Album'>Album</a>
        </li>   
		
		<li><a href='contact.php'>Liên hệ hỗ trợ</a></li>   
	
	</ul>
	
	"; // chua la thanh vien ko cho phep thuc thuc thao tac tren album, chi duoc xem
}
include "search.php";
if(isset($_GET['album'])) {
	$album = $_GET['album'];
}
else {
	$album = "";
	
}
if($album == "thanhvien") {
	
	echo "
<div id='content'>
<ul>
<li><a href='upload.php'>Tạo album mới</a></li>
<li><a href=#>Tải ảnh về</a></li>
<li><a href=#>Tìm kiếm nâng cao</a></li>
<li>xem list album</li>
</ul>
</div>
";
	
}
else if($album=="khach") {
	echo "
<div id='content'>
Xem list album
</div>
";
	
}

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php

if(isset($_GET['tit'])) {
	$tit = $_GET['tit'];
}
else {
	$tit = "Web- thu vien anh";
}
echo $tit;
?></title>
<link rel="stylesheet" type="text/css" href="style/style.css">
</head>

<body>
</body>
</html>